# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=pspg
pkgver=3.1.2
pkgrel=0
pkgdesc="A unix pager optimized for psql"
url="https://github.com/okbob/pspg"
arch="all"
options="!check" # there is no tests
license="BSD-2-Clause"
makedepends="automake autoconf ncurses-dev readline-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/okbob/pspg/archive/$pkgver.tar.gz
	fix-musl.patch
	"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="1446200bdfe88787083da32629acaedab6eaee68b3dccbff3f52c82165029cb0f558790951d5103876c84562fcd6b5578042bca134f4ed37b9c5de96fdc5602f  pspg-3.1.2.tar.gz
b1538580f0ba1d24f3b66cad611c0ddcc9d5b74e6f7e5a46a74b1271db957b7094d64b0eefbdea51a6e7c9297a5d914ef7e6e759d24da724bc1276bdf1614940  fix-musl.patch"
